<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="/xhtml/templates/layout.xhtml">

	<ui:define name="title">Nouvelle ouvrage</ui:define>

	<ui:define name="entete">
		<h:form id="enteteForm" styleClass="container-vertically-centered">
			<p:toolbar id="enteteTolBar">
				<p:toolbarGroup id="enteteTolBarGroup" align="left">
					<h:outputText value="Nouvelle ouvrage" />
				</p:toolbarGroup>
			</p:toolbar>
		</h:form>
	</ui:define>

	<ui:define name="nouvelleOuvrage_inscription">
		<h:form id="nouvelleOuvrage_inscriptionForm" styleClass="container-vertically-centered">
			<h:panelGrid id="nouvelleOuvrage_inscriptionGrid" columns="6" cellpadding="5" width="1000">

				<h:outputLabel for="codeISBN" value="Code ISBN" />
				<p:inputText id="codeISBN" value="#{manageBeanOuvrage.ouvrage.codeIsbn}" label="Code isbn" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgCodeISBN" />
				</p:inputText>
				<p:message id="msgCodeISBN" for="codeISBN" />

				<h:outputLabel for="titre" value="Titre" />
				<p:inputText id="titre" value="#{manageBeanOuvrage.ouvrage.titre}" label="Titre" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgTitre" />
				</p:inputText>
				<p:message id="msgTitre" for="titre" />

				<h:outputLabel for="dessinateur" value="Dessinateur" />
				<p:inputText id="dessinateur" value="#{manageBeanOuvrage.ouvrage.dessinateur}" label="Dessinateur" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgDessinateur" />
				</p:inputText>
				<p:message id="msgDessinateur" for="dessinateur" />

				<h:outputLabel for="auteur" value="Auteur" />
				<p:inputText id="auteur" value="#{manageBeanOuvrage.ouvrage.auteur}" label="Auteur" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgAuteur" />
				</p:inputText>
				<p:message id="msgAuteur" for="auteur" />

				<h:outputLabel for="editeur" value="Editeur" />
				<p:inputText id="editeur" value="#{manageBeanOuvrage.ouvrage.editeur}" label="Editeur" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgEditeur" />
				</p:inputText>
				<p:message id="msgEditeur" for="editeur" />

				<h:outputLabel for="nBpages" value="Nombre de pages" />
				<p:inputText id="nBpages" value="#{manageBeanOuvrage.ouvrage.nbPages}" label="Nombre de page" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgNbPages" />
				</p:inputText>
				<p:message id="msgNbPages" for="nBpages" />

				<h:outputLabel for="genre" value="Genre" />
				<p:inputText id="genre" value="#{manageBeanOuvrage.ouvrage.genre}" label="Genre" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgGenre" />
				</p:inputText>
				<p:message id="msgGenre" for="genre" />

				<h:outputLabel for="public" value="Public" />
				<p:inputText id="public" value="#{manageBeanOuvrage.ouvrage.genrePublic}" label="Publique" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgPublic" />
				</p:inputText>
				<p:message id="msgPublic" for="public" />

				<h:outputLabel for="provenance" value="Provenance" />
				<p:inputText id="provenance" value="#{manageBeanOuvrage.ouvrage.provenance}" label="Provenance" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgProvenance" />
				</p:inputText>
				<p:message id="msgProvenance" for="provenance" />

				<h:outputLabel for="parution" value="Parution" />
				<p:inputText id="parution" value="#{manageBeanOuvrage.ouvrage.parution}" label="Parution" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgParution" />
				</p:inputText>
				<p:message id="msgParution" for="parution" />

				<h:outputLabel for="empunter" value="Emprunter" />
				<p:inputText id="empunter" value="#{manageBeanOuvrage.ouvrage.emprunter}" label="Emprunter" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgEmpunter" />
				</p:inputText>
				<p:message id="msgEmpunter" for="empunter" />

				<h:outputLabel for="datePret" value="Date de Pret" />
				<p:inputText id="datePret" value="#{manageBeanOuvrage.ouvrage.datePret}" label="Date de pret" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgDatePret" />
				</p:inputText>
				<p:message id="msgDatePret" for="datePret" />

				<h:outputLabel for="aRendreLe" value="A rendre le" />
				<p:inputText id="aRendreLe" value="#{manageBeanOuvrage.ouvrage.arendreLe}" label="A rendre le" required="true">
					<f:validateRequired />
					<p:ajax event="blur" update="msgnArendreLe" />
				</p:inputText>
				<p:message id="msgnArendreLe" for="aRendreLe" />

			</h:panelGrid>
			
			<h:panelGrid id="nouvelleOuvrage_optionButtonGrid" columns="3" cellpadding="5" width="50" style="margin-left: 150px;">
				<p:commandButton value="Enregistrer" action="#{manageBeanOuvrage.add}" style="width:110px; height: 38px; font-size: 11px;" ajax="false" />
				<p:commandButton immediate="true" value="Effacer" action="failure" style="width:110px; height: 38px; font-size: 11px;" ajax="false" />
				<p:commandButton immediate="true" value="Annuler" action="successOuvrage" style="width:110px; height: 38px; font-size: 11px;" ajax="false" />				
			</h:panelGrid>
		</h:form>
	</ui:define>

	<ui:define name="pieddepage">
		<h:form id="pieddepageForm" styleClass="container-vertically-centered">
			<p:toolbar id="pieddepageTolBar">
				<p:toolbarGroup id="pieddepageTolBarGroup" align="left">
					<h:outputText value="Nouvelle ouvrage" />
				</p:toolbarGroup>
			</p:toolbar>
		</h:form>
	</ui:define>

</ui:composition>